home *** CD-ROM | disk | FTP | other *** search
- // Dynamic link library implementation of a second order neuron
-
- #include "NSDLL.h"
-
- /***********************************/
- /* Forward activation of component */
-
- __declspec(dllexport) void performAxon(
- DLLData *instance, // Pointer to instance data
- NSFloat *data, // Pointer to the layer of processing elements (PEs)
- int rows, // Number of rows of PEs in the layer
- int cols // Number of columns of PEs in the layer
- )
- {
- int i, length=rows*cols;
- NSFloat lastData=data[length-1];
-
- for (i=length-1; i>0; i--) {
- data[i] = lastData*data[i-1];
- lastData = data[i-1];
- }
- }
-